<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="老师itcast.core.js"></script>
</head>
<body>
    <div class="qq"></div>
</body>
<script>
     function parseHTML( html ) {

        // 1, 准备容器
        var  div = document.createElement( 'div' );
        // 2, 设置 innerHTML
        div.innerHTML = html;
        // 3, 取出来( 数组 )
         return div.childNodes;
//        var arr = [];
//        for ( var i = 0; i < div.childNodes.length; i++ ) {
//            arr.push( div.childNodes[ i ] );
//        }
//
//        return arr;
    };

    var divs=parseHTML("<div style='width: 400px; height: 100px; border: 1px solid red'>div1</div><div style='width: 400px; height: 100px; border: 1px solid red'>div2</div><div style='width: 400px; height: 100px; border: 1px solid red'>div3</div>")
    for(var i=0;i<divs.length;i++){
        document.body.appendChild(divs[i])
    }
    console.log(typeof divs);

</script>
</html>